#!/usr/bin/env python39
# -*- coding:utf-8 -*-
''':type
from PIL import Image
im=Image.open('F:\img\q123.jpg','r')
width=im.size[0]//3
height=im.size[1]//3 #宽高各除以3,获取裁剪后的单张图片大小
start_X=0
start_Y=0 #剪裁图片的右上角坐标
im_name=1 #用于给图片命名
for i in range(3):
    for j in range(3):
        crop=im.crop((start_X,start_Y,start_X+width,start_Y+height))
        crop.save(str(im_name)+'.jpg')
        start_X+=1
        im_name+=1
        start_X=0
        start_Y+=height
img=Image.open('F:\img\q123.jpg','r')
img.show()
print(img.size,img.format,img.mode)
'''

